﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using QuanLyHocBongSinhVien.DAO;
using QuanLyHocBongSinhVien.VO;

namespace QuanLyHocBongSinhVien.Bus
{
    class NamHoc_Bus
    {
        List<NamHoc_VO> list = new List<NamHoc_VO>();
        NamHoc_DAO nh = new NamHoc_DAO();

        public List<NamHoc_VO> getAllNamHoc()
        {
            DataTable dt = new DataTable();
            List<NamHoc_VO> l = new List<NamHoc_VO>();
            foreach (DataRow r in dt.Rows)
            {
                NamHoc_VO n = new NamHoc_VO();
                n.MaNH = r[0].ToString();
                n.HocKi = r[1].ToString();
            }
            return l;
        }

        public DataTable GetAllNamHoc()
        {
            return nh.getAllNamHoc();
        }
        public DataTable getMaNH1()
        {
            return nh.getMaNH();
        }

        public void add(string ma, string hk)
        {
            nh.themNH(ma, hk);
        }
        public void update(string ma, string hk)
        {
            nh.suaNH(ma, hk);
        }
        public void delete(string ma)
        {
            nh.xoaNH(ma);
        }
        public void TimKiem(string m)
        {
            nh.TimKiemNH(m);
        }
    }
}
